<--- %%NOBANNER%% --> defined.sas
 BackForward
/*-
title: Determine if a macro variable is defined

The defined macro returns a value of 0 (false) if the argument is
the name of a non-existent macro variable.  It returns a 1 if the
macro variable does exist.

This version was provided by Landy Manderson at uac/tucc.                  
-*/                                                             

%macro defined(name);                                                          
  %if %nrquote(&&&name)=%nrstr(&)&name %then 0; %else 1;                        
%mend;